package com.cauli.file.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cauli.model.entity.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * @author Cauli
 * @date 2023-03-18 12:00
 * @description 图片文件
 */
@Data
@TableName("picture_file")
@ApiModel(value = "PictureFile", description = "图片文件")
public class PictureFile extends BaseEntity {
    /**
     * 图片文件ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId("picture_file_id")
    private Long pictureFileId;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("user_id")
    private Long userId;

    /**
     * 文件名
     */
    @TableField("file_name")
    private String fileName;

    /**
     * 扩展名
     */
    @TableField("extend_name")
    private String extendName;

    /**
     *文件url
     */
    @TableField("file_url")
    private String fileUrl;

    /**
     * 文件大小
     */
    @TableField("file_size")
    private Long fileSize;

    /**
     * 存储类型
     */
    @TableField("storage_type")
    private Integer storageType;
}
